package D1;

import java.util.Arrays;

public class Java02 {
    public static void main(String[] args) throws CloneNotSupportedException {
        //clone方法：克隆当前对象，返回一个新的对象，而且，想要调用clone方法，必须让被克隆的类实现clone able接口
        User u1 = new User("123456","马冬梅","111",new double[]{1.00,2.00,3.00});
        User u2 = (User) u1.clone();
        System.out.println(u1.getId() +u1.getPassword()+ Arrays.toString(u1.getScore()) +u1.getUsername());
        System.out.println(u2.getId()+u2.getUsername()+u2.getPassword()+ Arrays.toString(u2.getScore()) +u2.getUsername());
    }
}
